/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.dao;

import com.legendshop.dao.GenericDao;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.constants.EventOperationTypeEnum;
import com.legendshop.oa.constants.EventTypeEnum;
import com.legendshop.oa.dto.EventQueryDto;
import com.legendshop.oa.model.UserEvent;
import com.legendshop.oa.security.UserDetail;

/**
 * 事件Dao.
 */

public interface EventDao extends GenericDao<UserEvent, Long> {

	/**
	 * 获取Id事件
	 *
	 * @param id the id
	 * @return the event
	 */
	public abstract UserEvent getEvent(Long id);


	/**
	 * 保存事件
	 *
	 * @param userEvent the user event
	 * @return the long
	 */
	public abstract Long saveEvent(UserEvent userEvent);
	
	/**
	 * 保存事件
	 *
	 * @param userEvent the user event
	 * @return the long
	 */
	public abstract Long saveEvent(UserDetail ud, Long relateId,String relateData, EventTypeEnum eventType,EventOperationTypeEnum eventOperationType);
	
	
	/**
	 * 保存事件
	 *
	 * @param userEvent the user event
	 * @return the long
	 */
	public abstract Long saveEvent(UserDetail ud, Long relateId,String title, String relateData, EventTypeEnum eventType,EventOperationTypeEnum eventOperationType);


	/**
	 * 查询事件
	 * @param curPageNO
	 * @param type
	 * @param relateId
	 * @param userName
	 * @return
	 */
	public PageSupport<UserEvent> getEventPage(EventQueryDto eventQueryDto);

}
